I am trying to setup a windows.resoruces style that targets all textbox's within all groupbox's (so it would not target textbox's that are not found within a groupbox)
I know I could use the x:key field, but was wondering if there was a way to target certain controls within controls for an entire window or application?
Pravesh Singh
04-Feb-2014You could try a nested style for your TextBoxes in Style.Resources of GroupBox with Style.TargetType but without x:key.
<Style TargetType="GroupBox">
<Style.Resources>
<Style TargetType="TextBox">
...
</Style>
</Style.Resources>
</Style>